class Animal():
    def description(self):
        print("im a animal")


class cat(Animal):
    pass


a=Animal()
C=cat()
a.description()
C.description()

#重写父类的方法，添加额外的方法
class dog(Animal):
    def description(self):
        print("im a dog")
    def call(self):
        print("wang wang wang")

d=dog()
d.description()
d.call()

#还支持多重继承  同时继承多个类,同时继承属性和方法

class fish():
    def swim(self):
        print("swimming in the water")


class superAnimal(Animal,fish):
    pass

monster=superAnimal()
monster.swim()
monster.description()


